"""drop users.prefs_json"""

from alembic import op
import sqlalchemy as sa


revision = "202510180002"
down_revision = "202510180001"
branch_labels = None
depends_on = None


def upgrade() -> None:
  with op.batch_alter_table("users") as batch_op:
    try:
      batch_op.drop_column("prefs_json")
    except Exception:
      # Column may have been removed manually
      pass


def downgrade() -> None:
  with op.batch_alter_table("users") as batch_op:
    batch_op.add_column(sa.Column("prefs_json", sa.JSON(), nullable=True))

